<div class="cp-oprbar">
  <div class="fill"></div>
  <div class="fixed-bottom">
    <div class="left">
      <button class="btn btn-flex btn-share" (click)="handleShare()">
        <img src="assets/images/HouseDetails/icon_share.png" /><span class="txt">分享</span>
      </button>
      <button class="btn btn-flex btn-follow" [class.on]="favorite" (click)="handleFavorite()">
        <img src="assets/images/HouseDetails/icon_follow{{ favorite ? '_on' : '' }}.png" />
        <span class="txt">{{ favorite ? '已关注' : '关注' }}</span>
      </button>
    </div>
    <!-- 房乐美模式 -->
    <div class="right flm" *ngIf="_mode === 'flm'">
      <button class="btn btn-md btn-radius btn-phone" [disabled]="!isBookEnable">
        <a href="tel:{{ phone }}">电话咨询</a>
      </button>
      <button class="btn btn-md btn-radius btn-gradient btn-appoint" [disabled]="!isBookEnable" (click)="handleOrder()">
        预约看房
      </button>
    </div>
    <!-- 经纪人模式 -->
    <div class="right broker" *ngIf="_mode === 'broker'">
      <button
        class="btn btn-flex btn-md btn-radius btn-gradient btn-favorite"
        [disabled]="!isBookEnable"
        (click)="popupShow = true"
      >
        <img src="assets/images/HouseDetails/icon_broke_favorite.png" /> <span class="txt">我感兴趣</span>
      </button>
    </div>
    <!-- 开发商模式 -->
    <div class="right developer" *ngIf="_mode === 'developer'">
      <button class="btn btn-flex btn-md btn-radius btn-gradient btn-phone">
        <img src="assets/images/HouseDetails/icon_broke_phone.png" /> <a href="tel:{{ phone }}" class="txt">拨打电话</a>
      </button>
    </div>
  </div>
</div>

<cp-popup [maskClick]="true" [(show)]="popupShow">
  <div class="popup-content">
    <div class="header">
      <span>&nbsp;</span> <span class="text">请选择经纪人</span>
      <span class="shutdowm" (click)="popupShow = false"><i class="icon icon-close"></i></span>
    </div>
    <div class="body">
      <div class="item border-top" *ngFor="let item of workers">
        <div class="left">
          <img [src]="item.Photo" class="avatar" />
          <div class="baseinfo">
            <div class="name-score">
              <span class="name">{{ item.Name }}</span>
              <cp-rate [score]="item.Score"></cp-rate>
            </div>
            <p class="org">{{ item.Organization }}</p>
            <p class="service">近30天服务{{ item.Service }}人</p>
          </div>
        </div>
        <div class="right">
          <p class="imgbox" (click)="handleOrder(item)"><img src="assets/images/HouseDetails/icon_broke_book.png" /></p>
          <a href="tel:{{ item.Phone }}" class="imgbox"><img src="assets/images/HouseDetails/icon_broke_tell.png"/></a>
        </div>
      </div>
    </div>
  </div>
</cp-popup>
